package org.springcloud.wisdom.spring_01_canteen.loginmsg.controller;

import org.springcloud.wisdom.spring_01_canteen.common.bean.ResponseData;
import org.springcloud.wisdom.spring_01_canteen.common.controller.BaseController;
import org.springcloud.wisdom.spring_01_canteen.login.entity.Admin;
import org.springcloud.wisdom.spring_01_canteen.loginmsg.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/firstadmin")
public class AdminController extends BaseController {
    @Autowired
    AdminService adminService;
    //修改管理员信息
    @PutMapping("/update")
    public ResponseData<Boolean> updateMall(@RequestBody Admin admin){
        return returnBoolean(adminService.updataAdmin(admin));
    }
}
